package com.wtb.javatool.entity;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import java.io.Serializable;
import java.util.Date;

@Data
@ToString
@ApiModel(value = "SelfBuiltDatabase",description="自建数据库")
public class SelfBuiltDatabase implements Serializable {
    @ApiModelProperty(value = "学号")
    private String studentId;
    @ApiModelProperty(value = "课程编号")
    private String courseId;
    @ApiModelProperty(value = "申请数据库名称")
    private String databaseName;
    @ApiModelProperty(value = "申请描述")
    private String description;
    @ApiModelProperty(value = "审批人编号(老师)")
    private String approverId;
    @ApiModelProperty(value = "授权人编号(管理员)")
    private String authorizerId;
    @ApiModelProperty(value = "审批状态")
    private int status;
    @ApiModelProperty(value = "申请创建时间")
    private Date createTime;


    public SelfBuiltDatabase(String studentId, String courseId, String description) {
        super();
        this.studentId = studentId;
        this.courseId = courseId;
        this.description = description;
    }
    public SelfBuiltDatabase(){
        this.createTime = new Date();
    }

    public  SelfBuiltDatabase(String studentId, String courseId, String description, String approverId) {
        this.studentId = studentId;
        this.courseId = courseId;
        this.databaseName = null;
        this.description = description;
        this.approverId = approverId;
        this.authorizerId = null;
        this.status = 0;
        this.createTime = new Date();
    }
}
